package com.cskaoyan.controller;

import com.cskaoyan.bean.BaseRespVo;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

@Controller
public class HelloController {

    @RequestMapping("hello1")
    public String hello() {
        System.out.println("hello1");
        return "/hello.jsp";
    }

    @RequestMapping("hello2")
    @ResponseBody
    public BaseRespVo hello2() {
        System.out.println("hello2");
        return BaseRespVo.ok("hello2");
    }
}
